<div id="top">
    <div class="container_12">
        <div class="grid_3">
            <div class="lang">
                <ul>
                    <li class="current"><a href="#">EN</a></li>
                    <li><a href="#">FR</a></li>
                    <li><a href="#">GM</a></li>
                </ul>
            </div><!-- .lang -->

            <div class="currency">
                <ul>
                    <li class="current"><a href="#">$</a></li>
                    <li><a href="#">&#8364;</a></li>
                    <li><a href="#">&#163;</a></li>
                </ul>
            </div><!-- .currency -->
        </div><!-- .grid_3 -->

        <div class="grid_9">
            <nav>
                <ul>
                    <li class="current"><a href="#">我的账户</a></li>
                    <li><a href="#">我的收藏</a></li>
                    <?php if($_SESSION['user']){?>
                        <li><a href="http://admin.anlin.com">后台管理</a></li>
                        <li><a href="{:U('/login/register',array('user_id'=>$user['user_id']))}">退出</a></li>
                    <?php }else{?>
                        <li><a href="{:U('/login/login')}">登陆</a></li>
                        <li><a href="{:U('/login/register')}">注册</a></li>
                    <?php }?>
                </ul>
            </nav>
        </div><!-- .grid_9 -->
    </div>
</div><!-- #top -->

<header>
    <div class="container_12">
        <div class="grid_3">
            <hgroup>
                <h1 id="site_logo"><a href="{:U('/index/index')}" title=""><img src="__PUBLIC__/Home/img/logo.png" alt="Online Store Theme Logo"></a></h1>
                <h2 id="site_description">网上商店主体</h2>
            </hgroup>
        </div><!-- .grid_3 -->

        <div class="grid_9">
            <div class="top_header">
            <if condition="$user['id']">
                <div class="welcome">
                    欢迎光临，{$user['account']}
                </div><!-- .welcome -->
                <else />
                <div class="welcome">
                    欢迎光临，您可以 <a href="{:U('/login/login')}">登陆</a> 或 <a href="{:U('/login/register')}">注册</a>.
                </div><!-- .welcome -->
            </if>
                <ul id="cart_nav">
                    <li>
                        <a class="cart_li" href="#">
                            <div class="cart_ico"></div>
                            购物车
                            <span>$0.00</span>
                        </a>
                        <ul class="cart_cont">
                            <li class="no_border recently">最近添加的产品</li>
                            <li>
                                <a href="/index/product_page" class="prev_cart"><div class="cart_vert"><img src="__PUBLIC__/Home/img/content/cart_img.png" alt="Product 1" title=""></div></a>
                                <div class="cont_cart">
                                    <h4>Faddywax Fragrance Diffuser Set <br>Gardenia</h4>
                                    <div class="price">1 x <span>$399.00</span></div>
                                </div>
                                <a title="close" class="close" href="#"></a>
                                <div class="clear"></div>
                            </li>

                            <li>
                                <a href="product_page.php" class="prev_cart"><div class="cart_vert"><img src="__PUBLIC__/Home/img/content/cart_img2.png" alt="Product 2" title=""></div></a>
                                <div class="cont_cart">
                                    <h4>Caldrea Linen and Room Spray</h4>
                                    <div class="price">1 x <span>$123.00</span></div>
                                </div>
                                <a title="close" class="close" href="#"></a>
                                <div class="clear"></div>
                            </li>
                            <li class="no_border">
                                <a href="/index/shopping_cart" class="view_cart">查看购物车</a>
                                <a href="checkout.php" class="checkout">去结账</a>
                            </li>
                        </ul>
                    </li>
                </ul><!-- .cart_nav -->

                <form class="search">
                    <input type="submit" class="search_button" value="">
                    <input type="text" name="search" class="search_form" value="" placeholder="搜你想要...">
                </form><!-- .search -->
            </div><!-- .top_header -->

            <nav class="primary">
                <ul>
                    <li class="curent"><a href="{$val['url']}">首页</a></li>
                <foreach name="nav" item="val">
                    <li class="parent">
                        <a href="{:U('/index/catalog_grid')}">{$val['name']}</a>
                        <ul class="sub">
                            <foreach name="val['one']" item="v">
                                <li><a href="index/catalog_grid?id={$v['id']}">{$v['name']}</a></li>
                            </foreach>
                        </ul>
                    </li>
                </foreach>
                    <!-- <li><a href="{:U('/index/catalog_grid')}">家具</a></li>
                    <li><a href="{:U('/index/catalog_grid')}">最新产品</a></li>
                    <li class="parent">
                        <a href="#">联系我们</a>
                        <ul class="sub">
                            <li><a href="{:U('/index/index')}">Home</a></li>
                            <li><a href="{:U('/index/typography_page')}">Typography and basic styles</a></li>
                            <li><a href="{:U('/index/catalog_grid')}">Catalog (grid view)</a></li>
                            <li><a href="{:U('/index/catalog_list')}">Catalog (list type view)</a></li>
                            <li><a href="{:U('/index/product_page')}">Product view</a></li>
                            <li><a href="{:U('/index/shopping_cart')}">Shoping cart</a></li>
                            <li><a href="{:U('/index/checkout')}">Proceed to checkout</a></li>
                            <li><a href="{:U('/index/compare')}">Products comparison</a></li>
                            <li><a href="{:U('/index/login')}">Login</a></li>
                            <li><a href="{:U('/index/contact_us')}">Contact us</a></li>
                            <li><a href="{:U('/index/404')}">404</a></li>
                            <li><a href="{:U('/index/blog')}">Blog posts</a></li>
                            <li><a href="{:U('/index/blog_post')}">Blog post view</a></li>
                        </ul>
                    </li> -->
                </ul>
            </nav><!-- .primary -->
        </div><!-- .grid_9 -->
    </div>
</header>